{extend name="common/userbase"} 
{block name="header_js"}
<script src="__STATICS__/js/footer.js" type="text/javascript"></script>
{/block}
{block name="title"}
<title>产品列表</title>
{/block}
{block name="content"}
<!--内页样式-->
<div class="Inside_pages">
		<div class="products">
		<!--当前位置（面包屑）-->
		 <div class="Location_link">
		 <em></em><a href="#">产品中心</a>  &lt;   <a href="#">巴山雀舌</a>  
		 </div>
		<!--筛选条件样式-->
		  <div class="products_Select marginbottom">
		   <div class="Filter">
	  <div class="Filter_list clearfix">
	   <div class="Filter_title"><span>品牌：</span></div>
	   <div class="Filter_Entire"><a href="#">全部</a></div>
	   <div class="p_f_name">
		<a href="#" title="莱家/Loacker">莱家/Loacker </a>  
		<a href="#" title="">丽芝士/Richeese</a>  
		<a href="#" title="白色恋人/SHIROI KOIBITO ">白色恋人/SHIROI KOIBITO </a> 
		<a href="#">爱时乐/Astick </a> 
		<a href="#">利葡/LiPO </a> 
		<a href="#">友谊牌/Tipo </a> 
		<a href="#"> 三立/SANRITSU  </a>  
		<a href="#"> 皇冠/Danisa </a>  
		<a href="#">丹麦蓝罐/Kjeldsens</a>  
	   </div>
	  </div>
	  <div class="Filter_list clearfix">
	  <div class="Filter_title"><span>包装方式：</span></div>
	  <div class="Filter_Entire"><a href="#">全部</a></div>
	  <div class="p_f_name">
	  <a href="#">袋装</a><a href="#">盒装</a><a href="#">罐装</a><a href="#">礼盒装</a><a href="#">散装(称重)</a>
	  </div>
	  </div>
	  <div class="Filter_list clearfix">
	  <div class="Filter_title"><span>价格：</span></div>
	  <div class="Filter_Entire"><a href="#">全部</a></div>
	  <div class="p_f_name">
		<a href="#">0-50</a><a href="#">50-150</a><a href="#">150-500</a><a href="#">500-1000</a><a href="#">1000以上</a>
	  </div>
	  </div>
	 </div>
		  </div>
		  <!--产品列表列表-->
		  <div class="products_list marginbottom">
		  <div class="Sorted">
	  <div class="Sorted_style">
	   <a href="#" class="on">综合<i class="icon-angle-down"></i></a>
	   <a href="#">销量<i class="icon-angle-down"></i></a>
	   <a href="#">价格<i class="icon-angle-down"></i></a>
	   <a href="#">新品<i class="icon-angle-down"></i></a>
	   </div>
	   <!--页数-->
	   <div class="s_Paging">
	   <span> 1/12</span>
	   <a href="#" class="on">&lt;</a>
	   <a href="#">&gt;</a>
	   </div>
	 </div>
	 <!--产品列表样式-->
	 <div class="p_list  clearfix">
		
	   <ul>
		{foreach name="shoper" id="val"}
		<li class="gl-item">
		<div class="Borders">
		 <div class="img"><a href="{:url('product/productdetailed')}?id={$val.id}"><img src="__UPLOADS__/{$val.src}" style="width:220px;height:220px"/></a></div>	 
		 <div class="name"><a href="{:url('product/productdetailed')}?id={$val.id}">{$val.shopname}</a></div>
		 <div class="Price">商城价：<b>¥{$val.discount}</b><span>原价：<em>{$val.price}</em></span></div>
		 <div class="Review">已有<a href="#">2345</a>评论</div>
		 <div class="p-operate">
			<input type="hidden" name="shop_id" value="{$val.id}">
			<a href="javascript:;" class="p-o-btn Collect" onclick="Collect(this)"><em></em>收藏</a>
			<a href="javascript:;" class="p-o-btn shop_cart" onclick="cart(this)"><em></em>加入购物车</a>
		 </div>
		 </div>
		</li>
		{/foreach}
	   </ul>
	   
	   <div class="Paging_style">
		 <a href="#" class="pn-prev disabled">&lt;上一页</a>
		 <a href="#" class="on">1</a>
		 <a href="#">2</a>
		 <a href="#">3</a>
		 <a href="#">4</a>
		 <a href="#">下一页&gt;</a>
		 <a href="#">尾页</a>
		<span class="p-skip"><em>共<b>232</b>页&nbsp;&nbsp;到第</em><input id="page_jump_num" value="1" onkeydown="javascript:if(event.keyCode==13){page_jump();return false;}" class="input-txt"><em>页</em><a href="javascript:page_jump();" class="btn btn-default">确定</a></span>
	   </div>
	 </div>
		  </div>
		  <!--分页样式-->
		<div class="Paging marginbottom">
		
		</div>
		</div>    
	<script>
		function Collect(a)
		{
			var shop_id = a.parentNode.getElementsByTagName('input')[0];
			shop_id = shop_id.value;
			$.ajax({
				'url':'{:url("Collect")}',
				'data':'shop_id='+shop_id,
				success:function(res){
					alert(res);
				}
			})
			
		}
		Collect()
		function cart(a)
		{
			var shop_id = a.parentNode.getElementsByTagName('input')[0];
			shop_id = shop_id.value;
			$.ajax({
				'url':'{:url("cart")}',
				'data':'shop_id='+shop_id,
				success:function(res){
					alert(res);
					window.location.href='{:url("productlist")}';
				}
			})
		}
		cart()
	
	</script>
	 </div>
{/block}
